package com.example.demo.dao;

import com.example.demo.bean.Time;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface TimeDao {

    /*查询*/
    @Select("select * from  timeaxis where Hospital=#{Hospital}")
    List<Time> time(String Hospital);

    /*新增*/
    @Insert("insert into timeaxis (Hospital,operation)values (#{Hospital},#{operation})")
    void insert(Time time);

    /*删除*/
    @Delete("DELETE FROM timeaxis WHERE operation = #{operation}")
    void delete(String operation);

    /*修改数据*/
    @Update("update timeaxis set  operation = #{operation} where t_id = #{t_id} ")
    void update(Time time);
}
